﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSE.Deployment.SetupBase.Parameter.Enums;
using System.Xml.Serialization;
using PSE.Deployment.SetupBase.Configuration;
using System.IO;

namespace PSE.Deployment.SetupBase.Parameter
{
    [Serializable]
    public class SetupParameter
    {
        [XmlAttribute()]
        public string InstallationPath { get; set; }

        [XmlAttribute()]
        public string FullInstallationPath { get; set; }

        [XmlAttribute()]
        public string ParametersFilePath { get; set; }

        [XmlAttribute()]
        public string InstalationSource { get; set; }

        [XmlAttribute()]
        public bool IsInstalled { get; set; }

        [XmlAttribute()]
        public bool HasInvalidPrograms { get; set; }

        [XmlAttribute()]
        public bool ShowWizard { get; set; }

        [XmlAttribute()]
        public bool ShowResult { get; set; }

        [XmlAttribute()]
        public bool IsCancelling { get; set; }

        public Licence Licence { get; set; }

        public SetupMode SetupMode { get; set; }

        [XmlIgnore]
        public Prerequisites Prerequisites { get; set; }

        public InstalledArtefactCollection InstalledArtefacts { get; set; }

        public PSE.Framework.Common.Version SystemVersion { get; set; }

        public List<ModuleVersion> Versions { get; set; }

        public SetupConfiguration SetupConfiguration { get; set; }

        public SetupParameter()
        {
            SetupMode = SetupMode.None;
            Licence = new Licence();
            Prerequisites = new Prerequisites();
            InstalledArtefacts = new InstalledArtefactCollection();
            Versions = new List<ModuleVersion>();            
            ShowWizard = true;
            ShowResult = true;
            IsCancelling = false;
        }
    }
}